<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Text</title>
</head>

<body>
    <script src="https://cdn.bootcdn.net/ajax/libs/Mock.js/1.0.1-beta3/mock-min.js"></script>
    <h2>F12打开控制台查看数据，效果更佳</h2>
    <div class="box">
        展示内容:<div id="content"></div>
    </div>
    <script>
        let Random = Mock.Random;
        //生成数据
        list = Mock.mock({
            //一段文本
            paragraph_1: Random.paragraph(),
            paragraph_2: Random.paragraph(2),
            paragraph_3: Random.paragraph(1, 3),
            paragraph_c1: Random.cparagraph(),
            paragraph_c2: Random.cparagraph(2),
            paragraph_c3: Random.cparagraph(1, 3),
            文本占位符: '@cparagraph',

            //句子
            sentence_1: Random.sentence(),
            sentence_2: Random.sentence(5),
            sentence_3: Random.sentence(3, 5),
            sentence_c1: Random.csentence(),
            sentence_c2: Random.csentence(5),
            sentence_c3: Random.csentence(3, 5),
            句子占位符: '@csentence',

            //单词
            word_1: Random.word(),
            word_2: Random.word(5),
            word_3: Random.word(3, 5),
            word_c1: Random.cword(),
            word_c2: Random.cword(5),
            word_c3: Random.cword(3, 5),
            词占位符: '@cword',

            //标题
            title_1: Random.title(),
            title_2: Random.title(5),
            title_3: Random.title(3, 5),
            title_c1: Random.ctitle(),
            title_c2: Random.ctitle(5),
            title_c3: Random.ctitle(3, 5),
            中文标题占位符: '@ctitle',
        })

        //展示数据
        console.table(list)
        x = document.getElementById("content");
        //将对象转为JSON
        x.innerHTML = JSON.stringify(list, null, '<br />');
    </script>

</body>

</html>